home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / chpt1.zip / CHPT1.FTP next >
Text File  |  1993-01-27  |  84KB  |  1,753 lines

  1.  
  2.                                   Volume I
  3.                                   ------ -
  4.  
  5.                             Khoros User's Manual
  6.                             ------ ---- - ------
  7.  
  8.                                  Chapter 1
  9.  
  10.                               GETTING STARTED
  11.  
  12.                      Introduction to the User's Manual
  13.  
  14.                              Primary Author(s):
  15.  
  16.                         John Rasure & Danielle Argiro
  17.                         ---- ------   -------- ------
  18.  
  19.                   c
  20.         Copyright   1992 University of New Mexico.  All rights reserved.
  21.  
  22.                           Printed: March 16, 1992
  23.  
  24.  
  25.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  26.         ------ -  -  ------ ------
  27.  
  28.                                   CONTENTS
  29.  
  30.         Chapter 1 - GETTING STARTED
  31.  
  32.         A.  INTRODUCTION ......................................    1
  33.  
  34.         B.  SETTING UP YOUR ENVIRONMENT .......................    1
  35.  
  36.               B.1  ENVIRONMENT VARIABLES ......................    1
  37.  
  38.               B.2  MODIFICATIONS TO THE .cshrc FILE ...........    4
  39.  
  40.               B.3  XDEFAULTS ..................................    5
  41.  
  42.         C.  X WINDOWS .........................................    6
  43.  
  44.         D.  USING KHOROS ROUTINES .............................    7
  45.  
  46.               D.1  COMMAND LINE USER INTERFACE ................    7
  47.  
  48.               D.2  GRAPHICAL USER INTERFACE ...................    8
  49.  
  50.               D.3  VISUAL LANGUAGE INTERFACE ..................    9
  51.  
  52.         E.  APPLICATION DEMOS .................................   11
  53.  
  54.               E.1 SEEING A JOURNAL PLAYBACK ...................   11
  55.  
  56.               E.2  MAKING A JOURNAL RECORDING .................   13
  57.  
  58.         F.  MAKING BUG REPORTS ................................   14
  59.  
  60.         G.  QUESTIONS?  COMMENTS?  COMPLIMENTS?  COMPLAINTS?
  61.  
  62.         H.  ADDITIONAL BACKGROUND .............................   16
  63.  
  64.               H.1  THE FILE BROWSER AND KEYWORDS CAPABILITY
  65.  
  66.               H.2  DATA TRANSPORT / DISTRIBUTED COMPUTING .....   19
  67.  
  68.               H.3  USE OF DIFFERENT FONTS & COLORS ............   24
  69.  
  70.                    H.3.1  CHANGING THE FONT FOR AN ENTIRE
  71.         APPLICATION ...........................................   24
  72.  
  73.                    H.3.2  CHANGING THE FONTS & COLORS WITHIN
  74.         AN APPLICATION ........................................   25
  75.  
  76.         KHOROS                  Release: 1.0                   1 - i
  77.  
  78.  
  79.  
  80.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  81.         ------ -  -  ------ ------
  82.  
  83.                               GETTING STARTED
  84.  
  85.         A.  INTRODUCTION
  86.         -   ------------
  87.  
  88.              Khoros is a software  environment  for  research  which
  89.         uses  visual  programming as a tool for software development
  90.         for scientific  visualization.   The  Khoros  infrastructure
  91.         consists  of  several  layers  of interacting subsystems.  A
  92.         user interface development system (UIDS)  combines  a  high-
  93.         level  user interface specification with methods of software
  94.         development and maintenance that are embedded in a code gen-
  95.         eration  tool  set.  An  interoperable  data exchange format
  96.         (VIFF)  and  algorithm  library  contain   the   application
  97.         specific  layer.   The UIDS can be used to create three user
  98.         interface styles: (1) a command line user interface,  (2)  a
  99.         graphical, form/menu based user interface, and (3) the basic
  100.         operations of a visual programming language.  The result  is
  101.         an extensible visual programming environment.
  102.  
  103.              The current library  of  over  260  routines  has  been
  104.         developed to facilitate research in image processing, signal
  105.         processing, pattern  recognition,  remote  sensing,  machine
  106.         vision,  and geographic information systems.  Khoros is also
  107.         a valuable teaching tool for signal and image processing.
  108.  
  109.         B.  SETTING UP YOUR ENVIRONMENT
  110.         -   ------- -- ---- -----------
  111.  
  112.              In order for you to access  the  Khoros  software  from
  113.         your   login  environment,  the  following  issues  must  be
  114.         addressed:
  115.  
  116.         (1)  Khoros environment variables must be defined.
  117.  
  118.         (2)  Your path must be set to include the Khoros binaries.
  119.  
  120.         (3)  Xdefaults for the Khoros system must be  set  by  using
  121.              the ".Xdefaults" file.
  122.  
  123.              These  are  discussed  in   the   following   sections.
  124.         Examples   of  the  files  described  are  included  in  the
  125.         directory $KHOROS HOME/dotfiles.
  126.                          -
  127.  
  128.         B.1  ENVIRONMENT VARIABLES
  129.  
  130.         KHOROS                  Release: 1.0                   1 - 1
  131.  
  132.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  133.         ------ -  -  ------ ------
  134.  
  135.              Environment variables for Khoros are typically put in a
  136.         file  called  .khoros env  which  should  be  created in the
  137.                              -
  138.         user's home  directory  and  sourced  at  login.   The  most
  139.         important environment variable, "KHOROS HOME", indicates the
  140.                                                -
  141.         directory where Khoros has been installed:
  142.         % setenv KHOROS HOME directory
  143.                        -     ---------
  144.  
  145.              Another very important  environment  variable  that  is
  146.         used  by  UNIX  and Khoros is the "TMPDIR" variable.  Khoros
  147.         uses this directory as the location of all  temporary  files
  148.         and images.  It should be set to a large directory, as in:
  149.         % setenv TMPDIR /usr/tmp
  150.  
  151.              Several of the maintenance and installation  procedures
  152.         (kinstall  and ksrcconf) send mail to indicate their status.
  153.         If you want this mail  sent  to  a  specific  account,  then
  154.         include the following line:
  155.         % setenv KHOROS MAIL user name
  156.                        -     ---------
  157.  
  158.              Programs will log their  execution  occurrence  into  a
  159.         command log file if the "KHOROS LOG" environment variable is
  160.                                        -
  161.         set to a valid filename:
  162.         % setenv KHOROS LOG filename
  163.                        -    --------
  164.         If you do not want command log files to appear at  all,  you
  165.         may set KHOROS LOG to /dev/null.
  166.                       -
  167.  
  168.              Programs will print out a warning message and a default
  169.         value   for   each   option   that   is   not  used  if  the
  170.         "KHOROS VERBOSE" flag is set.  In general, this flag is  set
  171.                -
  172.         to 'no':
  173.         % setenv KHOROS VERBOSE no
  174.                        -
  175.  
  176.              Specification of input files for Khoros programs may be
  177.         shortened by use of the Keywords capability; this capability
  178.         provides a shorthand for the specification of  input  files.
  179.         The use of the Keywords capability is explained in detail in
  180.         the last section  of  this  chapter;  on-line  help  can  be
  181.         accessed  from  the  "Help"  button that appears on the file
  182.         browser.  If desired, you may create your own Keywords  file
  183.         defining  your  own  preferred  shorthand to frequently-used
  184.         input  files,  and  set  the  "KHOROS KEYWORDS"  environment
  185.                                              -
  186.         variable  to  it;   otherwise,  the  Keywords  shorthand  is
  187.         defined in the Keywords file:
  188.         % setenv KHOROS KEYWORDS $KHOROS HOME/repos/Keywords
  189.                        -                -
  190.  
  191.              When any new programs are added to the  Khoros  system,
  192.         they  must be installed in a Toolbox.  A toolbox is simply a
  193.         directory structure whose layout and contents mimic those of
  194.         $KHOROS HOME.    A  complete  explanation  of  Toolboxes  is
  195.                -
  196.         contained at the end of Chapter 1 (Writing Programs) of  the
  197.         Khoros  Programmer's  Manual. The Toolbox file defines which
  198.         toolboxes are accessable to you as a user;  for example,  if
  199.         you  want access to the "vfrog" program that is installed in
  200.         the "amphibians" toolbox,  you  must  have  a  Toolbox  file
  201.  
  202.         KHOROS                  Release: 1.0                   1 - 2
  203.  
  204.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  205.         ------ -  -  ------ ------
  206.  
  207.         containing   an   entry  that  references  the  "amphibians"
  208.         toolbox. If desired, you may create your  own  Toolbox  file
  209.         defining   your  own  preferred  toolbox(es),  and  set  the
  210.         "KHOROS TOOLBOX" environment variable to it;  otherwise, the
  211.                -
  212.         Toolbox(es)  accessable  to  you  are defined in the Toolbox
  213.         file:
  214.         % setenv KHOROS TOOLBOX $KHOROS HOME/repos/Toolbox
  215.                        -               -
  216.  
  217.              The data transport mechanisms of Khoros  allow  you  to
  218.         specify  input  and output data for Khoros programs when the
  219.         data is actually located on a different machine  from  which
  220.         the   Khoros   programs   in  question  are  executed.   The
  221.         distributed computing capability of  Khoros  allows  you  to
  222.         specify  on which computer a particular Khoros program is to
  223.         be executed.  The data transport and  distributed  computing
  224.         capabilities  go  hand  in hand; together, they allow you to
  225.         take advantage of  all  available  computing  resources  and
  226.         efficiently solve information processing problems.
  227.  
  228.              For example, you might want to  run  the  fast  fourier
  229.         transform  program,  vfft,  on  machine  A,  which  has fast
  230.         hardware and will be able  to  execute  the  cpu-  intensive
  231.         program  in a short amount of time;  however, you might want
  232.         to get input data for vfft from machine B,  which  has  more
  233.         memory  and  is therefore where most of your large data sets
  234.         are located.  The "KHOROS HOSTS" environment  variable  must
  235.                                  -
  236.         point  to the file which defines which machines may interact
  237.         within the data transport mechanism;  this ascii file simply
  238.         lists  all  available  computers  on which you might execute
  239.         Khoros programs or read/write data for Khoros  programs.   A
  240.         computer  MUST  be listed in the Khoros Hosts file before it
  241.                                                -
  242.         can be used with data transport or distributed computing:
  243.         % setenv KHOROS HOSTS $KHOROS HOME/repos/Khoros Hosts
  244.                        -             -                 -
  245.  
  246.              Here is an example of  the  .khoros env  file.   Create
  247.                                                 -
  248.         this  file  in your home directory, or copy the example file
  249.         given   in   $KHOROS HOME/dotfiles/khoros env.    Note   the
  250.                             -                    -
  251.         references          to          $KHOROS HOME/repos/Keywords,
  252.                                                -
  253.         $KHOROS HOME/repos/Toolbox,                              and
  254.                -
  255.         $KHOROS HOME/repos/Khoros Hosts.    These three files may be
  256.                -                 -
  257.         used as examples of the Keywords, Toolbox, and  Khoros Hosts
  258.                                                               -
  259.         files;  you  may  use the former two as they are, or you may
  260.         copy them elsewhere and customize  them  for  your  personal
  261.         use.   Simply  remember  to update the "KHOROS KEYWORDS" and
  262.                                                       -
  263.         "KHOROS TOOLBOX" environment variables to point to  the  new
  264.                -
  265.         locations  of  your  customized  files, as the Khoros system
  266.         will continue to use the  default  files  until  you  update
  267.         these   environment   variables.   Remember  that  you  MUST
  268.         customize  the  Khoros Hosts  file  if  you  want  to   take
  269.                               -
  270.         advantage  of  the  data transport and distributed computing
  271.         capabilities of the Khoros system.  The  simple  reason  for
  272.         this  is  that the default Khoros Hosts file contains a list
  273.                                          -
  274.         of our machines  here  at  the  University  of  New  Mexico;
  275.         obviously, this machine list will not be valid at your site.
  276.  
  277.         KHOROS                  Release: 1.0                   1 - 3
  278.  
  279.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  280.         ------ -  -  ------ ------
  281.  
  282.                 #   ----------------------------------------------
  283.                 #   This file must be sourced (source .khoros env)
  284.                                                              -
  285.                 #   or included in your .login or .cshrc
  286.                 #   ----------------------------------------------
  287.                 #
  288.                 #   This file contains default values for ALL
  289.                 #   environmental variables used by KHOROS.
  290.  
  291.                 setenv KHOROS HOME              directory name
  292.                              -                  --------------
  293.                 setenv KHOROS MAIL              $USER
  294.                              -
  295.                 setenv KHOROS LOG               $HOME/khoros.cmdlog
  296.                              -
  297.                 setenv KHOROS VERBOSE           no
  298.                              -
  299.                 setenv KHOROS KEYWORDS          $KHOROS HOME/repos/Keywords
  300.                              -                         -
  301.                 setenv KHOROS TOOLBOX           $KHOROS HOME/repos/Toolbox
  302.                              -                         -
  303.                 setenv KHOROS HOSTS             $KHOROS HOME/repos/Khoros Hosts
  304.                              -                         -                 -
  305.                 setenv TMPDIR                   /usr/tmp
  306.  
  307.              Important note:  when you  install  patches,  files  in
  308.         $KHOROS HOME/repos  will  be over-written.  For this reason,
  309.                -
  310.         if you have customized your  "Keywords",  "Toolbox",  and/or
  311.         "Khoros Hosts"  files for your personal use, we suggest that
  312.                -
  313.         you move these files to another location outside the  Khoros
  314.         system.
  315.  
  316.         B.2  MODIFICATIONS TO THE .cshrc FILE
  317.  
  318.              For the Khoros system to  work  correctly,  the  Khoros
  319.         environment  file (describe above) must be sourced at login.
  320.         This can be done by adding a source statement at the top  of
  321.                                                              ---
  322.         the ".cshrc" file.  The Khoros binary directory must also be
  323.         added to your search  path.   To  indicate  where  Khoros  X
  324.         applications  will  be  displayed,  the  DISPLAY environment
  325.         variable must be  set  to  your  workstation.   One  way  to
  326.         accomplish  these actions is to modify your .cshrc file with
  327.                                                            ---- ----
  328.         the following changes.
  329.         --- --------- -------
  330.  
  331.         KHOROS                  Release: 1.0                   1 - 4
  332.  
  333.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  334.         ------ -  -  ------ ------
  335.  
  336.                 # Source the .khoros env file to set environment variables:
  337.                                     -
  338.                 # (This must be included before the "set path" command!)
  339.                 source $HOME/.khoros env
  340.                                     -
  341.  
  342.                 # Modify your path to include $KHOROS HOME/bin:
  343.                                                      -
  344.                 set path=(. ~{$USER}/bin $KHOROS HOME/bin ...)
  345.                                                 -
  346.  
  347.                 # Set the X Window environment variable DISPLAY:
  348.                 # (this is optional)
  349.                 setenv DISPLAY workstation:0
  350.                                -----------
  351.  
  352.         B.3  XDEFAULTS
  353.  
  354.              The  ".Xdefaults"  file  is  read  by  X  Windows-based
  355.         applications  during  startup to customize the appearance or
  356.         characteristics  of  their  windows.   See  the  example  in
  357.         $KHOROS HOME/dotfiles/Xdefaults.    This   is  a  very  long
  358.                -
  359.         .Xdefaults file;  however, the majority of it is devoted  to
  360.         controlling  the  colors  that  appear on the various Khoros
  361.         applications.  You need not be concerned  with  this  unless
  362.         you   would   like   to  customize  the  colors  for  Khoros
  363.         applications for  your  own  use.   If  you  would  like  to
  364.         customize the colors, it is easiest to edit this file and do
  365.         a global change.  For example, if  you  use  the  vi  visual
  366.                                                           --
  367.         editor,  and  want  all  subform buttons to appear in orange
  368.         instead of royal blue, you can do:
  369.  
  370.         :1,$ s/royal blue/orange/g
  371.  
  372.              If you use the emacs visual editor, the  global  change
  373.                             -----
  374.         can be made with:
  375.  
  376.         <esc> x replace-string
  377.  
  378.         Remember, any time you change your .Xdefaults file  and  you
  379.         --------  --- ---- --- ------ ----  --------- ----  ---  ---
  380.         want  to  see  that change reflected when you run X Windows-
  381.         ----  --  ---  ---- ------ --------- ---- --- --- - -------
  382.         based applications, you must execute:
  383.         ----- ------------  --- ---- -------
  384.  
  385.         % xrdb {desired .Xdefaults file}
  386.           ----  -------  --------- ----
  387.  
  388.              If  you  have  problems  when  running  Khoros   on   a
  389.         monochrome         screen,         look        at        the
  390.         $KHOROS HOME/dotfiles/Xdefaults.mono file  for  examples  of
  391.                -
  392.         lines  you  might try changing, or simply use this Xdefaults
  393.         file instead.
  394.  
  395.         KHOROS                  Release: 1.0                   1 - 5
  396.  
  397.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  398.         ------ -  -  ------ ------
  399.  
  400.         C.  X WINDOWS
  401.         -   - -------
  402.  
  403.              Since Khoros runs under the X Windows  (X11R4)  system,
  404.         it  is  helpful to have an understanding of X Windows before
  405.         attempting to use Khoros.  For  those  that  would  like  to
  406.         learn  more  about  X  Windows,  we  recommend the "X Window
  407.         System User's Guide" by Valerie Quercia  and  Tim  O'Reilly.
  408.         In addition to this book, O'Reilly and Associates, Inc. have
  409.         published volumes on X Protocol, Xlib, the  X  Toolkit,  and
  410.         XView,  some  or  all  of  which  may  prove valuable to the
  411.         interested reader.  A brief description of X Windows can  be
  412.         obtained with the Unix man command:
  413.         % man X
  414.  
  415.              The  details  of  managing   the   windows,   such   as
  416.         interpreting   mouse   and  keyboard  commands,  moving  and
  417.         resizing, are actually carried out by  a  program  called  a
  418.         window  manager.  On many systems the window manager used is
  419.         ------  -------
  420.         twm.  Another popular window manager (used  with  SUN's)  is
  421.         olwm, or Open Windows window manager.  Use the % man command
  422.         to find out more about your  window  manager.   Some  window
  423.         managers  have  automatic window placement, while others use
  424.         manual window placement;  some  window  managers  "decorate"
  425.         the  tops  of  windows, while others do not.  The operations
  426.         that you must  perform  to  resize  a  window,  refresh  the
  427.         screen,  and  so  forth are dictated by your window manager.
  428.         If your site supports more than one window manager, you  may
  429.         have  a choice as to which one is the most suitable for you.
  430.         As the window manager will affect the  operation  of  Khoros
  431.         programs,  you  should  be  reasonably comfortable with your
  432.         window manager before using the Khoros system.  It should be
  433.         noted  that  Khoros  was  developed  primarily under the twm
  434.         window manager;  most Khoros programs have also been  tested
  435.         under  olwm.   Never  attempt  to  run  more than one window
  436.                        -----
  437.         manager at the same time.
  438.  
  439.              Once you have logged onto a  system  and  are  using  X
  440.         Windows,  you  may  need  to  tell the system where you want
  441.         Khoros images to be displayed. This is done by  setting  the
  442.         environment variable DISPLAY.  The command:
  443.         % setenv DISPLAY workstation:0
  444.                          -----------
  445.         tells X Windows and Khoros to send images  and  graphics  to
  446.         the  primary screen (screen 0) of the named workstation.  If
  447.                                                     -----------
  448.         you have originally logged in to one machine, and  then  rsh
  449.         or  rlogin  to a second machine on which you are going to be
  450.         running Khoros applications, you must execute:
  451.         % xhost {second machine}
  452.         on the original machine before going to the  second  machine
  453.         and executing the setenv DISPLAY command given above for the
  454.         display of the second machine.
  455.  
  456.         KHOROS                  Release: 1.0                   1 - 6
  457.  
  458.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  459.         ------ -  -  ------ ------
  460.  
  461.         D.  USING KHOROS ROUTINES
  462.         -   ----- ------ --------
  463.  
  464.         D.1  COMMAND LINE USER INTERFACE
  465.  
  466.              The  Khoros  routines  can  be  invoked  as  individual
  467.         programs  from the command line, using a standard, Unix-like
  468.         interface.  By convention, all of the  program  options  are
  469.         preceded  by a minus sign and a flag type.  For example, the
  470.         flag -i typically indicates an input file and -o  an  output
  471.         file.   Thus,  the  program to shrink the image contained in
  472.         file infile by a factor of  two  and  store  the  result  in
  473.              ------
  474.         outfile, is invoked with:
  475.         -------
  476.         % vshrink -i KHOROS HOME/data/images/ball.xv -o outfile -s 2
  477.                            -
  478.         To display an image file on the screen, you can use:
  479.         -- ------- -- ----- ---- -- --- ------  --- --- ---
  480.         % putimage -i KHOROS HOME/data/images/ball.xv
  481.           --------  - ----------- ---- ------ ---- --
  482.  
  483.              If you don't know how to use a program, you can  get  a
  484.         brief description by typing the program name followed by the
  485.         -U usage flag.  This will produce a short description and  a
  486.         list of the required and optional arguments.  For example:
  487.         % vshrink -U
  488.  
  489.         produces
  490.  
  491.         vshrink :
  492.  
  493.              Shrink an image by skipping pixels (subsampling)
  494.  
  495.              -i  input image  (infile)
  496.              -o  output (shrunk image)  (outfile)
  497.  
  498.              [-s]  shrink scale factor (integer, > 0) [2]
  499.  
  500.              [-V] Gives the version for vshrink
  501.              [-U] Gives the usage for vshrink
  502.              [-P] Prompts for command line options
  503.              [-A [file1]] Creates the answer file called vshrink.ans
  504.              or file1
  505.              [-a [file1]] Uses vshrink.ans or file1  as  the  answer
  506.              file
  507.  
  508.              If you would prefer to be prompted  for  the  arguments
  509.         one  by  one,  use  the  -P  flag.  The -A option creates an
  510.         answer file containing the parameters  you  have  specified;
  511.         referencing  the  program  again  with  -a  flag  reads  any
  512.         parameters not specified on the command line from the answer
  513.         file   (useful  if  the  same  parameters  are  to  be  used
  514.         repeatedly).
  515.  
  516.              To get a detailed description of a Khoros routine,  use
  517.  
  518.         KHOROS                  Release: 1.0                   1 - 7
  519.  
  520.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  521.         ------ -  -  ------ ------
  522.  
  523.         the  vman  command,  which  is  patterned after the Unix man
  524.         command:
  525.         % vman vshrink
  526.  
  527.              If you would like to know which routines are associated
  528.         with  a  specific  action or idea, use the vman command with
  529.         the -k keyword option.  Thus
  530.                -------
  531.         % vman -k shrink
  532.         produces the listing
  533.         -------- --- -------
  534.  
  535.         vshrink(1)  -   Shrink   an   image   by   skipping   pixels
  536.         ------- -       ------   --   -----   --   --------   ------
  537.         (subsampling)
  538.          -----------
  539.         lvshrink(3)  -  Shrink   an   image   by   skipping   pixels
  540.         -------- -      ------   --   -----   --   --------   ------
  541.         (subsampling)
  542.          -----------
  543.  
  544.         which tells us that there is a program, vshrink,  to  shrink
  545.         an  image,  and  a  library routine, lvshrink(), that may be
  546.                                              --------
  547.         called by a program to perform the shrinking operation.
  548.  
  549.              Stdin can be used  for  any  input  file  but  must  be
  550.         specified by using a "-" for the file name.  Stdout can also
  551.         be used for any output file.  In this way, the output of one
  552.         program  can be connected to the input of another using Unix
  553.         pipes.  Thus:
  554.         % vshrink -i image.xv -o - -s 2 | putimage -i -
  555.         invokes vshrink to shrink the image in image.xv, and  passes
  556.                                                ----- --
  557.         the  result to the display routine putimage to display it on
  558.         the screen.
  559.  
  560.         Stderr can be used for an ASCII  output  file  but  must  be
  561.         specified using "#" for the file name.
  562.  
  563.         D.2  GRAPHICAL USER INTERFACE
  564.  
  565.              Khoros includes several major application programs that
  566.         always have a graphical user interface, in addition to their
  567.         command line user interface.  Among others, these include an
  568.         animation/image     sequencing     program,     an     image
  569.         display/manipulation package, an image warping  application,
  570.         an  interactive  imagery/elevation  display  package,  a  2D
  571.         plotting package, and a 3D plotting package.  To  begin  use
  572.         of  these  programs,  you  may  want  to skip forward to the
  573.         section labelled, "APPLICATION DEMOS" to see demos of  these
  574.         applications.   In  addition,  you  might  try the following
  575.         commands as an introduction to these programs.
  576.         % animate -i $KHOROS HOME/data/sequences/eye/eyes
  577.                             -
  578.         To see the animation sequence of 60 frames (hit  the  button
  579.         labeled  ">>"  to  start,  "Stop" to stop, "Quit" to end the
  580.         program).
  581.  
  582.         KHOROS                  Release: 1.0                   1 - 8
  583.  
  584.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  585.         ------ -  -  ------ ------
  586.  
  587.         % editimage -i $KHOROS HOME/data/images/feath.xv
  588.                               -
  589.         To see an image displayed.
  590.  
  591.         % xprism2 -i11 $KHOROS HOME/data/plot functions/example2.1
  592.                               -              -
  593.         To plot a pre-defined set of data points in two dimensions.
  594.  
  595.         % xprism3 -i11 $KHOROS HOME/data/plot functions/example3.0
  596.                               -              -
  597.         To  plot  a  pre-defined  mathematical  function  in   three
  598.         dimensions.
  599.  
  600.         D.3  VISUAL LANGUAGE INTERFACE
  601.  
  602.              All  the  routines  available  in  the   Khoros   image
  603.         processing  library (ipl), digital signal processing library
  604.         (dspl), and file format conversion library can  be  accessed
  605.         using the command line user interface (CLUI).  However, most
  606.         users prefer the graphical user interface (GUI) provided  by
  607.         the  visual programming language, cantata.  Image and signal
  608.         processing tasks are  often  naturally  expressed  as  block
  609.         diagrams  or  data  flow graphs.  By providing a programming
  610.         environment in a similar  format,  cantata  assists  in  the
  611.         rapid prototyping of applications in those fields.
  612.  
  613.              To create a visual program  using  cantata,  you  begin
  614.         with  a  blank  cantata  workspace.   Selecting  the desired
  615.         Khoros routines to perform various tasks,  you  then  create
  616.         iconfied  representations  of  the  Khoros  routines, called
  617.         glyphs.  Next, you connect the glyphs  together  with  lines
  618.         ------
  619.         that  go  from  one  glyph's output arrow to another glyph's
  620.         input arrow. This is the equivalent  of  running  the  first
  621.         Khoros program from the command line, saving its output in a
  622.         temporary file, using the temporary file  as  input  to  the
  623.         next program, and so forth.  A complete cantata workspace is
  624.         a visual program  made  up  of  glyphs  representing  Khoros
  625.         programs,  with  lines representing the flow of data between
  626.         routines.  The entire program  can  be  run  using  a  "Run"
  627.         button  located  on the cantata form,  or the program may be
  628.         run step by step by clicking on the little "on/off" switches
  629.         that  appear  at  the  upper  left hand corner of each glyph
  630.         representing an executable Khoros program.
  631.  
  632.              At any time, a cantata workspace may  be  saved  as  an
  633.         ascii  file.  Later, cantata may be run, restoring the saved
  634.         workspace, so that you may continue with your visual program
  635.         where you left off before.
  636.  
  637.              If you would like to see a  simple,  easy-to-understand
  638.         example of a cantata workspaces, you might try executing the
  639.         journal playback session of cantata mentioned in the section
  640.         labelled, "APPLICATION DEMOS", or you might execute:
  641.  
  642.         %                      cantata                      -restore
  643.  
  644.         KHOROS                  Release: 1.0                   1 - 9
  645.  
  646.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  647.         ------ -  -  ------ ------
  648.  
  649.         $KHOROS HOME/repos/workspace/examples/example1.Z
  650.                -
  651.  
  652.              The objective  of  this  first  visual  program  is  to
  653.         enhance  a dim image. We will go through the example step by
  654.         step, so that you  can  follow  along  using  cantata  while
  655.         reading this section.  The input image is represented by the
  656.         first glyph, labelled, "images".  On this  glyph,  click  on
  657.         the button with the picture of the forms (meant to represent
  658.         the graphical user interface).  The glyph will open up  into
  659.         the  corresponding  graphical  user interface; in this case,
  660.         the Input Data subform with the Images pane  displayed.  You
  661.         can  see  that the input image selected is "spine.xv".  This
  662.         will be the input image for our visual program.   Now  click
  663.         on  the button at the upper left hand corner of the subform,
  664.         labelled "Glyph".  The Input Data  subform  will  turn  back
  665.         into  a  glyph,  and  go  back  to  its place on the cantata
  666.         workspace.
  667.  
  668.              Notice that the "images" glyph's output is connected to
  669.         two other glyphs:  the "put update" glyph and the "vconvert"
  670.                                    -
  671.         glyph.  This means that the spine.xv image will  be  serving
  672.         as  input  to  two  Khoros  routines:  putimage and vconvert
  673.         (usually, the glyph name is identical to  the  name  of  the
  674.         program  that  it represents - however, the putimage program
  675.         is a  special  case:   it  has  two  glyph  representations,
  676.         "put update"  and  "put multi", which are used differently).
  677.             -                  -
  678.         First, click on the "put update" glyph's "run" button, which
  679.                                 -
  680.         appears  at the top right and has a picture of an electrical
  681.         switch. This will run the putimage program with spine.xv  as
  682.         the  input.   Since  spine.xv  is not of data type BYTE, you
  683.         will be prompted to convert the image.  Click on  "Cont"  to
  684.         indicate  "Yes".   The spine.xv image will then be converted
  685.         to type BYTE and displayed by  putimage.   Notice  that  the
  686.         image  of  the  spine is very dim; most of its colors are on
  687.         the dark end of the grey scale spectrum.
  688.  
  689.              Now, go to the glyph  labelled,  "vconvert".   It  will
  690.         also  have  spine.xv as its input, as indicated by the lines
  691.         representing data flow.  Click on its run button in order to
  692.         call the vconvert program to convert the data in spine.xv to
  693.         type BYTE in preparation for the next step.
  694.  
  695.              The vhstr program will do a histogram  stretch  on  the
  696.                                          ---------  -------
  697.         colors in the input image.  That is, it will attempt to even
  698.         out the colors in the image, so that instead  of  being  all
  699.         bunched together at the dark end of the grey scale spectrum,
  700.         they will cover a larger number of colors ranging from black
  701.         to  white.   To  run  the  vhstr  program  on  the converted
  702.         spine.xv data, click on the  "run"  button  of  the  "vhstr"
  703.         glyph.   To  see the results of the histogram stretch, click
  704.         on the "run" button of the last  "put update"  glyph.   This
  705.                                              -
  706.         will  call  putimage  once  again  to  display the resulting
  707.         image.  Note that this  image  is  much  brighter  than  the
  708.         original;  vertibrae  are easy to distinguish, and much more
  709.  
  710.         KHOROS                  Release: 1.0                  1 - 10
  711.  
  712.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  713.         ------ -  -  ------ ------
  714.  
  715.         detail is apparent.  So, our example visual  program  was  a
  716.         success!
  717.  
  718.              Delete the images displayed by putimage by clicking the
  719.         mouse  inside  them,  or  clicking the mouse on the "on/off"
  720.         switch that appears to the upper right hand  corner  of  the
  721.         put update  glyph.  If  desired,   you can repeat the entire
  722.            -
  723.         process quickly by hitting the "RESET" button which  appears
  724.         to  the  left  of the cantata form, and then clicking on the
  725.         "RUN" button that appears right above it. The visual program
  726.         will  repeat  itself all at once, not step by step as in the
  727.         first try.  Glyphs can be moved about by  clicking  on  them
  728.         with  the  mouse  and  moving  them  while holding the mouse
  729.         button down.
  730.  
  731.              By clicking on the "Workspace" subform  button  on  the
  732.         cantata  form, you can set environment options for cantata -
  733.         for instance, you may prefer small glyphs instead  of  large
  734.         ones,  you  may  wish  to indicate when data is available at
  735.         inputs and outputs, you may wish  cantata  to  echo  program
  736.         execution  to  your  tty,  or  you  might  want  to  use the
  737.         interactive glyph placement option.  These and other options
  738.         may be set as desired.
  739.  
  740.              There  are  two  other  example   workspaces   in   the
  741.         $KHOROS HOME/repos/workspace/examples directory that you are
  742.                -
  743.         welcome to try.  We will not go  over  them  here,  but  the
  744.         README  file in that directory will explain the objective of
  745.         each workspace.  You are encouraged to experiment with these
  746.         examples of cantata.
  747.  
  748.              For more information about the cantata program, you can
  749.         execute  %  vman  cantata;    Chapter 2 of the Khoros User's
  750.         Manual is  recommended  for  further  understanding  of  the
  751.         cantata visual language.
  752.  
  753.         E.  APPLICATION DEMOS
  754.         -   ----------- -----
  755.  
  756.         E.1  SEEING A JOURNAL PLAYBACK
  757.  
  758.              All Khoros  xvroutines,  including  animate,  composer,
  759.                          ----------
  760.         editimage, viewimage, warpimage, xprism2, and xprism3 have a
  761.         built-in journal record / journal playback  capability  that
  762.         is  provided via the graphical user interface.  If you add a
  763.         new xvroutine to Khoros,  it  will  also  have  the  journal
  764.         record  /  playback  ability  (see  Chapter  1 of the Khoros
  765.         Programmer's Manual for more information on  xvroutines  and
  766.         journal  playback).  This journal record/playback capability
  767.         is available so that you may run the demos that are provided
  768.         for  you  in  KHOROS HOME/repos/journal, and create your own
  769.                             -
  770.  
  771.         KHOROS                  Release: 1.0                  1 - 11
  772.  
  773.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  774.         ------ -  -  ------ ------
  775.  
  776.         journal sessions,  if  desired.   Furthermore,  the  journal
  777.         record / playback capability of these programs is what makes
  778.         them viable target programs  for  the  Khoros  collaboration
  779.         program,  concert  (see  Chapter  9  of  the  Khoros  User's
  780.         Manual).
  781.  
  782.              When playing back a journal session, a  small  "Journal
  783.         Control"  widget  will  appear.   Since the journal playback
  784.         session grabs your keyboard,  this  Journal  Control  widget
  785.                 ----- ---- --------
  786.         reminds  you of the simple control commands that the journal
  787.         playback mechanism understands.  The command keys will  work
  788.         regardless  of  where the mouse pointer is located when they
  789.         are hit;  remember, your keyboard has been grabbed,  so  you
  790.         will  not be allowed to provide keyboard input to any window
  791.         that may currently be displayed until the journal  recording
  792.         is  finished.   The  following are the three simple commands
  793.         that journal playback understands:
  794.  
  795.         h or H:        Halts the journal playback session.
  796.  
  797.         c or C:        Continues the journal playback session.
  798.  
  799.         q or  Q:        Quits  the  journal  playback  session,  and
  800.                        allows  you  to  continue  execution  of  the
  801.                        application on your own,  at  whatever  point
  802.                        the journal playback left off.
  803.  
  804.              There are predefined  application  demos  for  all  the
  805.         major  Khoros  applications.   All of these demos are run by
  806.         executing the desired  application  with  the  [-jp  {record
  807.         file}.jp]  option, where "jp" stands for "journal playback".
  808.         In addition, any other  options  that  were  used  when  the
  809.         journal  file was created must also be used when the journal
  810.         recording is  played  back.  The  following  is  a  list  of
  811.         commands  that  may  be  run  in order to see the predefined
  812.         application demos that are  provided  with  the  Khoros  1.0
  813.         release.   Journal  record  files  are always named with the
  814.         postfix, ".jp".
  815.  
  816.         % animate -i $KHOROS HOME/data/sequences/bush/bushes
  817.                             -
  818.                   -jp $KHOROS HOME/repos/journals/animate.jp
  819.                              -
  820.  
  821.         % cantata -jp  $KHOROS HOME/repos/journals/cantata.jp
  822.                               -
  823.  
  824.         % composer -jp  $KHOROS HOME/repos/journals/composer.jp
  825.                                -
  826.  
  827.         % editimage -jp $KHOROS HOME/repos/journals/editimage.jp
  828.                                -
  829.  
  830.         % viewimage -i $KHOROS HOME/data/images/feath.eye
  831.                               -
  832.                     -e  $KHOROS HOME/data/images/flow.eye
  833.                                -
  834.                     -jp  $KHOROS HOME/repos/journals/viewimage.jp
  835.                                 -
  836.  
  837.         % warpimage -jp  $KHOROS HOME/repos/journals/warpimage.jp
  838.                                 -
  839.  
  840.         KHOROS                  Release: 1.0                  1 - 12
  841.  
  842.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  843.         ------ -  -  ------ ------
  844.  
  845.         % xprism2 -jp $KHOROS HOME/repos/journals/xprism2.jp
  846.                              -
  847.  
  848.         % xprism3 -jp $KHOROS HOME/repos/journals/xprism3.jp
  849.                              -
  850.  
  851.              In some cases, the fact that journal playback grabs the
  852.         keyboard may present a problem.  If you need to have control
  853.         of the keyboard while journal playback is running, you must
  854.         use the [-jg 0] or [-jg false] (where "jg" stands for
  855.         "journal grab") option in addition to the [-jp {journal
  856.         file}] option.  When this option is used, the Journal
  857.         Control Widget will not appear.  It is mainly used for
  858.         debugging purposes by the Khoros group, but some people may
  859.         find it useful.
  860.  
  861.         E.2  MAKING A JOURNAL RECORDING
  862.  
  863.              You may wish to create your own application demos using
  864.         the  journal  recording  mechanism  that  is built in to all
  865.         Khoros  xvroutines.   The  journal  recording   /   playback
  866.         mechanism is machine independent, so if you want to record a
  867.         session on one machine and  play  it  back  on  a  differing
  868.         architecture,  this  will  not pose a problem.  If, however,
  869.         the journal recording was made with a particular  font,  and
  870.         is  played  back  with a different font,  the graphical user
  871.         interface may have trouble sizing  itself  properly.   While
  872.         this  mars  the physical appearance of the application being
  873.         played back, it will  not  harm  the  functionality  of  the
  874.         recording.
  875.  
  876.              To make a journal  recording  of  a  Khoros  xvroutine,
  877.         simply  use the [-jr {record file}] option that is available
  878.         with all Khoros xvroutines.  For example, say that we  would
  879.         like  to  make  a  journal  record file of xprism.  We would
  880.         execute the following:
  881.  
  882.         % xprism2 -jr my xprism2 demo.jp
  883.                         -       -
  884.  
  885.              This will create the journal recording file,
  886.         "my xprism2 demo.jp".  To play back the recorded session, we
  887.            -       -
  888.         execute:
  889.  
  890.         % xprism2 -jp my xprism2 demo.jp
  891.                         -       -
  892.  
  893.              Remember that any other options you used when recording
  894.         the session must also be used when playing it back.
  895.                     ---- ---- -- ---- ---- ------- -- ----
  896.         Therefore, if you record a session with editimage as:
  897.  
  898.         % editimage -i $KHOROS HOME/data/images/lizard.xv -jr editimage demo.jp
  899.                               -                                        -
  900.  
  901.         KHOROS                  Release: 1.0                  1 - 13
  902.  
  903.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  904.         ------ -  -  ------ ------
  905.  
  906.              You MUST play back the session with:
  907.                  ----
  908.  
  909.         % editimage -i $KHOROS HOME/data/images/lizard.xv -jp editimage demo.jp
  910.                               -                                        -
  911.  
  912.              Attempting, for example, to execute a journal playback
  913.         of editimage without the input file that the journal
  914.         recording was made with:
  915.  
  916.         % editimage -jp editimage demo.jp
  917.                                  -
  918.  
  919.              Will not work!  We cannot predict exactly what the
  920.         results will be, but we can guarantee that they will not be
  921.         what you recorded.  For this reason, when making journal
  922.         recording sessions, it is recommended that you use as few
  923.         command line arguments as possible, thus making it less
  924.         likely to forget what they were when you play back the
  925.         session.
  926.  
  927.         F.  MAKING BUG REPORTS
  928.         -   ------ --- -------
  929.  
  930.              As with any system approaching the size of  the  Khoros
  931.         system,  you  can  expect to find some bugs.  We already are
  932.         aware  of   several   bugs;    these   can   be   found   in
  933.         $KHOROS HOME/repos/BugList.  If you find a bug in the Khoros
  934.                -
  935.         system, please look through this file first to see if it  is
  936.         one  of  the  bugs  that  we  already  have on our list.  We
  937.         strongly encourage you to report any bugs that you may  find
  938.         --------
  939.         that  are  not  listed  in  the BugList.  ALL BUGS are to be
  940.         reported  via  email,   to   khoros-bugs@chama.eece.unm.edu.
  941.                        -----
  942.         NOTE:   BUG  REPORTS  ONLY are to be mailed to this address.
  943.         ----    ---  -------  ---- --- -- -- ------ -- ---- -------
  944.         If you have comments, questions, or other  feedback,  please
  945.         -- --- ---- --------  ---------  -- -----  --------   ------
  946.         see  the  next  section.  There is a bug-reporting template,
  947.         ---  ---  ----  -------   ----- -- - --- --------- --------
  948.         $KHOROS HOME/repos/BugReport, that we hope you will use.  If
  949.          ----------- ----- ---------
  950.         you  do  not  use  the  template  to  report the bug, please
  951.                                                               ------
  952.         include the following information:
  953.         ------- --- --------- -----------
  954.  
  955.         1)   The program or library routine containing the bug
  956.  
  957.         2)   A clear and concise description of the problem.  If the
  958.              problem  was  experienced  when  using cantata, a saved
  959.              workspace that shows the bug  is  very  helpful,  along
  960.              with the explanation.
  961.  
  962.         3)   Step-by-Step instructions for someone else to follow in
  963.              order to reproduce the bug
  964.  
  965.         4)   The machine architecture that  you  were  on  when  you
  966.  
  967.         KHOROS                  Release: 1.0                  1 - 14
  968.  
  969.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  970.         ------ -  -  ------ ------
  971.  
  972.              experienced the bug
  973.  
  974.         5)   The operating system  that  you  were  using  when  you
  975.              experienced the bug
  976.  
  977.         6)   The version of X Windows  that  is  installed  on  your
  978.              system (if not X11R4)
  979.  
  980.         7)   The window manager that you were using at the time
  981.  
  982.              Please remember  that  all  the  above  information  is
  983.         imperative  for  a bug report, so that members of the Khoros
  984.         group will be able to re-produce the bug and fix it.
  985.  
  986.         G.  QUESTIONS?  COMMENTS?  COMPLIMENTS?  COMPLAINTS?
  987.         -   ---------   --------   -----------   ----------
  988.  
  989.              For general discussion  purposes,  getting  answers  to
  990.         questions  that  are  not  addressed  in the Khoros Manuals,
  991.         writing comments, or giving constructive criticism, we  have
  992.         an open-format (unmoderated) mailing group. The name of this
  993.         mailing group is khoros@chama.eece.unm.edu, and was  created
  994.         due to popular demand.  In addition, it helps us to separate
  995.         actual bug reports (which, as indicated above, should go  to
  996.         khoros-bugs@chama.eece.unm.edu) from other mail.
  997.  
  998.              If you would like to become  a  member  of  the  Khoros
  999.         mailing    list,    send    your    request    to    khoros-
  1000.         request@chama.eece.unm.edu.  PLEASE: only requests to get on
  1001.                                      ------
  1002.         or  off  the  Khoros mailing list should go to this address.
  1003.         Other mail is very likely to get lost or be deleted.
  1004.  
  1005.              Once a member of the Khoros mailing list, feel free  to
  1006.         write to khoros@chama.eece.unm.edu.  If you have a question,
  1007.         and it is not answered  in  the  Khoros  Manuals  or  Khoros
  1008.         online  documentation, you are invited to mail your question
  1009.         to this address.  If the Khoros  group  cannot  answer  your
  1010.         question  immediately, it is likely that another Khoros user
  1011.         may be able to (there  are  well  over  300  people  on  the
  1012.         mailing list already).  Constructive criticism, suggestions,
  1013.         or   open-format   discussions   are   also    welcome    at
  1014.         khoros@chama.eece.unm.edu.    Of course, everyone is invited
  1015.         to join the mailing list,  but if you use the Khoros  system
  1016.         often, we especially encourage you to join.
  1017.  
  1018.              The Khoros mailing list  sometimes  does  get  alot  of
  1019.         traffic;   some  users may not want to receive the amount of
  1020.         mail that is frequently associated with the  Khoros  mailing
  1021.         list.   For  this  reason,  we have recently started our own
  1022.         news group, Comp.soft-sys.khoros.  If you are  a  reader  of
  1023.         network  news,  we  encourage  you  to  participate  in  our
  1024.         newsgroup.      Note      that      all      letters      to
  1025.  
  1026.         KHOROS                  Release: 1.0                  1 - 15
  1027.  
  1028.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1029.         ------ -  -  ------ ------
  1030.  
  1031.         khoros@chama.eece.unm.edu   are   forwarded   to  Comp.soft-
  1032.         sys.khoros;   (the  opposite  is   not   true)   thus,   the
  1033.         Comp.soft-sys.khoros news group offers an alternative way of
  1034.         keeping up with the Khoros community if you do not  wish  to
  1035.         be a part of the mailing list.
  1036.  
  1037.         H.  ADDITIONAL BACKGROUND
  1038.         -   ---------- ----------
  1039.  
  1040.              For most first-time Khoros users, the previous sections
  1041.         will provide enough information to get started using Khoros.
  1042.         However, if you were a user of Khoros Beta and  are  already
  1043.         familiar  with  the  system,  or if you simply would like to
  1044.         know more about additional features that can  be  used  with
  1045.         the  major  Khoros applications, the following sections will
  1046.         provide additional information that you can  take  advantage
  1047.         of  to  customize  your  environment,  and  use  the  Khoros
  1048.         software more efficiently.
  1049.  
  1050.         H.1  THE FILE BROWSER AND KEYWORDS CAPABILITY
  1051.  
  1052.              The Khoros Browser provides an alternative to typing in
  1053.         filenames for input from an InputFile selection that appears
  1054.         on the graphical user of any  Khoros  program.   The  Khoros
  1055.         Browser  can  be  used  in  two  ways:  as  a file/directory
  1056.         browser, or as a  browser  for  keywords.  When  the  Khoros
  1057.         browser  is  used  as  a file browser, one uses the mouse to
  1058.         move about the directory structure to find the desired input
  1059.         file;   when  it  is used as a keyword browser, one uses the
  1060.         mouse to move  about  the  keyword  structure  to  find  the
  1061.         desired file.
  1062.  
  1063.         USING THE FILE BROWSER
  1064.  
  1065.         The default mode for the Khoros Browser is to act as a  File
  1066.         Browser.   The first item in the list of the file browser is
  1067.         the word, "-- keywords --".  By  selecting  this  item,  you
  1068.         change  the  Khoros browser to the second mode, which is the
  1069.         Keyword Browser;  we  will  talk  about  this  in  the  next
  1070.         section.  The rest of the list is the contents of your local
  1071.         directory; to enter an input file that is  located  in  your
  1072.         local  directory,  simply  select the desired filename.  The
  1073.         browser will go away, and the parameter box of the InputFile
  1074.         selection  from  which  it originated will be filled in with
  1075.         the selected filename.  Using the file browser, you may also
  1076.         move  about  the directory structure by clicking on "../" to
  1077.         move up in the directory structure, or by  clicking  on  the
  1078.  
  1079.         KHOROS                  Release: 1.0                  1 - 16
  1080.  
  1081.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1082.         ------ -  -  ------ ------
  1083.  
  1084.         name  of the desired directory to move down in the directory
  1085.         structure.  When the item you select from the browser is the
  1086.         name  of  a  file, the entire path to that file prepended to
  1087.         the filename will become your input file;  the file  browser
  1088.         will  go  away, and the file you selected will appear in the
  1089.         InputFile selection.
  1090.  
  1091.         Alternatively, one may also type the entire  directory  path
  1092.         directory  into  the  text  box  at  the  bottom of the file
  1093.         browser,  following  the  directory  path  with  a  carriage
  1094.         return.   The  file browser will immediately update the list
  1095.         with the contents of the specified directory.   Notice  that
  1096.         the  directory  box  at  the  bottom  of  the  file  browser
  1097.         continually updates to the current pathname, so  one  always
  1098.         knows where the current directory is.
  1099.  
  1100.         USING THE KEYWORD BROWSER
  1101.  
  1102.         By selecting  the  first  item  of  the  file  browser,  "--
  1103.         keywords  --",  you  cause the Khoros Browser to change from
  1104.         being a file browser  to  being  a  keywords  browser.   The
  1105.         keywords  browser  provides  a convenient shorthand for long
  1106.         pathnames  to   input   files;    furthermore,    once   the
  1107.         controlling  Keywords  file is set up, one need not remember
  1108.         the location of an input file - only it's keyword.
  1109.  
  1110.         The keywords used by the Khoros system are determined by the
  1111.         Keywords  file, located in KHOROS HOME/repos/Keywords.  Take
  1112.                                          -
  1113.         a moment now to look  at  this  file.   Each  entry  in  the
  1114.         Keywords  file  consists  of  a  single  line  of text:  the
  1115.         keyword or keyword  set,  followed  by  the  path  that  the
  1116.         shorthand represents.  The first entries are single keywords
  1117.         that are shorthand notations for very frequently used files.
  1118.         For   instance,   ":feath"   is  a  shorthand  notation  for
  1119.         "KHOROS HOME/data/images/feath.254.xv".  Once this entry  is
  1120.                -
  1121.         established  in  the  Keywords  file,  one  may use ":feath"
  1122.         anywhere an input file is needed, in either a  command  line
  1123.         user  interface or a graphical user interface. For instance,
  1124.         one might type:
  1125.  
  1126.         % editimage -i :feath
  1127.  
  1128.         instead of:
  1129.  
  1130.         % editimage -i KHOROS HOME/data/images/feath.xv
  1131.                              -
  1132.  
  1133.         Or, on the Input/Output pane of editimage, one might enter
  1134.  
  1135.         KHOROS                  Release: 1.0                  1 - 17
  1136.  
  1137.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1138.         ------ -  -  ------ ------
  1139.  
  1140.         ":feath" in the parameter box labeled, "Khoros image file as
  1141.         INPUT:". Note that when typed by the user, a single keyword
  1142.                                 ----- -- --- ----
  1143.         MUST be preceded by the ":" symbol to distinguish it from an
  1144.         actual file in one's local directory.
  1145.  
  1146.         Finally, one might use the Keyword browser, and select
  1147.         "feath" from the Keywords list.  Again, the result is to
  1148.         input the image of the woman with the feathered hat.
  1149.  
  1150.         Keywords may be sub-divided as desired.  For instance, in
  1151.         the KHOROS HOME/repos/Keywords file, "plot3D:example3.0" is
  1152.                   -
  1153.         defined to be a shorthand for
  1154.         KHOROS HOME/data/plot functions/example3.0. Subdividing
  1155.               -              -
  1156.         keywords allows us to conceptually group input files as
  1157.         desired; in this case, the "plot3D" group has 5 elements --
  1158.         example3.0 through example3.4.  In addition, subdivision of
  1159.         keywords causes the Keywords Browser to mimic the operation
  1160.         of the File Browser.
  1161.  
  1162.         The meaning of ":" following a keyword in the Keywords
  1163.         Browser is equivalent to a "/" following a filename of a
  1164.         file in the File browser;  ie, when you click on this item,
  1165.         the current list will be replaced by a list of those items
  1166.         that are subordinate to the first item.  Our Keywords file
  1167.         defines the "plot2D" keyword as having 5 subordinate
  1168.         keywords: example2.0 - example2.4.  Thus, when we click on
  1169.         the "Plot2D:" entry of the Keywords Browser, we are
  1170.         presented with a list of those 5 subordinate keywords.  Now,
  1171.         clicking on "example2.4" causes the Keyword Browser to
  1172.         expand the Keyword "path" to "plot2D:example2.4", which in
  1173.         turn is defined in the Keywords file as the shorthand
  1174.         representing KHOROS HOME/data/plot functions/example2.4.
  1175.                            -              -
  1176.  
  1177.         The next time the Khoros Browser is used, it "remembers"
  1178.         that the last operation was to use the Keywords Browser,
  1179.         under the "Plot2D" keyword category, so it goes back to that
  1180.         "location" - again, we are presented with the list of
  1181.         example2.0 - example2.4.  By clicking on "<==" (the
  1182.         equivalent of "../" in the File Browser) we go "up" to the
  1183.         original Keywords list.  We may now choose another keyword
  1184.         ("moon", for instance, is the shorthand to
  1185.         KHOROS HOME/data/images/moon.xv) or we may again click on
  1186.               -
  1187.         "<==".  Since we are now at the "top" level of the Keyword
  1188.         Browser, there is no where else to go, except back to the
  1189.         File Browser.
  1190.  
  1191.         While complicated to explain, the use of Keywords is very
  1192.         trivial after only a little practice;  users are encouraged
  1193.         to take advantage of this convenient and time-saving
  1194.         shorthand.  Furthermore, the Keywords file found in
  1195.         KHOROS HOME/repos is only meant as a model;  the user is
  1196.               -
  1197.         encouraged to create their own Keywords file, to personalize
  1198.         the operation of keywords. When creating your own Keywords
  1199.         file, be sure to follow the syntax rules carefully:
  1200.  
  1201.         KHOROS                  Release: 1.0                  1 - 18
  1202.  
  1203.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1204.         ------ -  -  ------ ------
  1205.  
  1206.         1) all single keywords must be preceded with a ":".
  1207.         2) keywords may be subdivided as many times as desired but
  1208.         remember: if you subdivide your keywords too much, your
  1209.         shorthand is no longer short!
  1210.         3) each keyword must be followed by some white space, and
  1211.         then its full path definition.
  1212.         4) each keyword/path pair must appear on a single line
  1213.         5) comments are preceded by a "#" in the first column.
  1214.  
  1215.         Now that you have created your Keywords file, you must tell
  1216.         the khoros environment to use it.  You do this by going to
  1217.         the .khoros env file in KHOROS HOME/.khoros env and changing
  1218.                    -                  -            -
  1219.         the line that says,
  1220.  
  1221.         setenv KHOROS KEYWORDS          $KHOROS HOME/repos/Keywords
  1222.                      -                         -
  1223.  
  1224.         to:
  1225.  
  1226.         setenv KHOROS KEYWORDS          $USER/Keywords file
  1227.                      -                        -------- ----
  1228.  
  1229.         Note that the .khoros env file must be sourced (source
  1230.                              -
  1231.         .khoros env) or included in your .login or .cshrc file.
  1232.                -
  1233.         From now on, you can use your own keywords to your own best
  1234.         advantage.
  1235.  
  1236.         H.2  DATA TRANSPORT / DISTRIBUTED COMPUTING
  1237.  
  1238.              "Data transport" refers to the method used to  transfer
  1239.         data  between  processes.   Data transport mechanisms can be
  1240.         local or remote.  Local transport mechanisms include  shared
  1241.         memory,   files,   pipes,  and  streams;   remote  transport
  1242.         mechanisms include sockets, tli, and rpc.  With the  use  of
  1243.         remote  data  transport,  the  ability to get input from and
  1244.         output to remote machines is  implemented,  and  distributed
  1245.         processing is made possible.
  1246.  
  1247.              "Distributed processing" means the ability  to  specify
  1248.         remote  machines  on  which  to  execute  individual  Khoros
  1249.         programs.  The capability to do  distributed  processing  is
  1250.         implemented  via  employment  of  the  remote data transport
  1251.         mechanisms.   With  distributed  processing,   one  needs  a
  1252.         method  to  execute jobs remotely, as well as a mechanism to
  1253.         transport data back & forth  from  the  remote  machine.   A
  1254.         remote daemon, "phantomd", is started on the remote machine,
  1255.         takes  requests  to  execute  a  job,  and  transports  data
  1256.         involved  with  that  job  using  the  remote data transport
  1257.         mechanisms.
  1258.  
  1259.              Note that Patch 4 to Khoros implements a "beta" version
  1260.         of  data  transport / distributed processing; the capability
  1261.         will be refined, improved  and  extended  in  future  Khoros
  1262.  
  1263.         KHOROS                  Release: 1.0                  1 - 19
  1264.  
  1265.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1266.         ------ -  -  ------ ------
  1267.  
  1268.         releases.  One  limitation  of  this  first  version of data
  1269.         transport / distributed processing involves whether or not a
  1270.         transport  mechanism  provides  permanent  data storage.  By
  1271.                                         ---------  ---- -------
  1272.         their nature, some transport  mechanisms  provide  permanent
  1273.         data storage, while others do not. Permanent data storage is
  1274.         offered by transport mechanisms such as  shared  memory  and
  1275.         files;   it  is  not provided by sockets, pipes, or streams.
  1276.         When permanent data storage is not available, the  scheduler
  1277.         used  by  cantata  will  be  unable  to execute a network of
  1278.                   -------
  1279.         glyphs unless it starts at the very beginning, where initial
  1280.                                 -- --- ---- ---------
  1281.         input  is  provided  in  a permanent form.  Thus, when using
  1282.         distributed processing, which  is  implemented  via  a  non-
  1283.         permanent  data transport mechanism (sockets) you must click
  1284.         on the "RESET" button and run the network completely through
  1285.         every time.  We realize that this limitation is inconvenient
  1286.         and  restrictive;   in  future  versions  of   Khoros,   the
  1287.         scheduler  used  by  cantata  will  be  improved  so  as  to
  1288.         eliminate this problem.
  1289.  
  1290.              The transport mechanisms that are (at least  partially)
  1291.         supported by individual Khoros vroutines are:
  1292.  
  1293.         shm: Shared Memory (local transport / permanent storage)
  1294.  
  1295.         file:Standard  Unix  file  (local  transport   /   permanent
  1296.              storage)
  1297.  
  1298.         pipe:Standard Pipes (local transport / no permanent storage)
  1299.  
  1300.         stream:
  1301.              Named  stream/pipe  (local  transport  /  no  permanent
  1302.              storage)
  1303.  
  1304.         socket:
  1305.              Socket  transport  (remote  transport  /  no  permanent
  1306.              storage)
  1307.  
  1308.              Transport  mechanisms  used  by  the   cantata   visual
  1309.         language are:
  1310.  
  1311.         shm: Shared Memory (local transport / permanent storage)
  1312.  
  1313.         file Standard  Unix  file  (local  transport   /   permanent
  1314.              storage)
  1315.  
  1316.         socketSocket transport  (remote  transport  /  no  permanent
  1317.              storage)
  1318.  
  1319.              In the future, other transport mechanisms that  may  be
  1320.         implemented include:
  1321.  
  1322.         sunvm:Sun's Virtual memory (permanent storage)
  1323.  
  1324.         tli: Sys V Transport Layer Interface
  1325.  
  1326.         KHOROS                  Release: 1.0                  1 - 20
  1327.  
  1328.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1329.         ------ -  -  ------ ------
  1330.  
  1331.         sunrpc:
  1332.              Sun's remote procedure call
  1333.  
  1334.         apollorpc:
  1335.              Apollo's remote procedure call
  1336.  
  1337.         machvm:
  1338.              Mach's Virtual Memory
  1339.  
  1340.              Your computer architecture will dictate which, if  any,
  1341.         of  these  transport  mechanisms are available for your use.
  1342.         Note that data transport and distributed processing will not
  1343.         be  available on some computer architectures.  Also be aware
  1344.         that this "beta" version of data transport in  cantata  does
  1345.         have  limited capability;  some transport mechanisms may not
  1346.         always be used even when most appropriate for the situation.
  1347.  
  1348.              The   data   transport   and   distributed   processing
  1349.         capability may be taken advantage of either from the cantata
  1350.         visual language, or from individual command line  executions
  1351.         of  Khoros programs.  However, before distributed processing
  1352.         may be utilized, the KHOROS HOSTS environment variable  must
  1353.                                    -
  1354.         be set properly, and the ".rhosts" or ".rhosts.bk" file must
  1355.         be made available at the top level directory of the  account
  1356.         on which you are running Khoros. Also, to enable distributed
  1357.         processing, a Khoros "phantom" daemon  must  be  started  on
  1358.         each machine which is to execute jobs remotely.
  1359.  
  1360.              The KHOROS HOSTS environment variable simply  specifies
  1361.                        -
  1362.         a  file (by default, ".khoros hosts") in which all computers
  1363.                                      -
  1364.         which are available for remote data transport are listed.
  1365.  
  1366.              In addition to  setting  the  KHOROS HOSTS  environment
  1367.                                                  -
  1368.         variable properly, it is essential that you have a ".rhosts"
  1369.         file set up properly before  you  can  use  the  distributed
  1370.         processing   capabilities  of  Khoros.  The  ".rhosts"  file
  1371.         contains a list of host computers.  This file allows a  user
  1372.         who  has  an  account  on the local machine to log in from a
  1373.         remote host without suppling a  password;  more  importantly
  1374.         with respect to the use of distributed processing, it allows
  1375.         the user to start a process on  that  remote  machine.    To
  1376.         simplify matters, it is easiest to set up the ".rhosts" file
  1377.         and the ".khoros hosts" file at the same  time.   They  will
  1378.                         -
  1379.         look identical, except that the ".rhosts" file will have the
  1380.         addition of the applicable login name appearing  after  each
  1381.         machine  name.   Note: some sites do not allow ".rhosts", so
  1382.         you can use ".rhosts.bk", and the "phantom" daemon will move
  1383.         ".rhosts.bk" to ".rhosts" temporarily.
  1384.  
  1385.              Once the KHOROS HOSTS environment variable is set,  and
  1386.                             -
  1387.         the  ".rhosts"  file  is  added  to  the  top  level of your
  1388.         account, there are two ways you may use the data transport /
  1389.         distributed  processing  capabilities  of Khoros.  The first
  1390.         way is via the cantata visual language.
  1391.  
  1392.         KHOROS                  Release: 1.0                  1 - 21
  1393.  
  1394.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1395.         ------ -  -  ------ ------
  1396.  
  1397.              When data transport / distributed processing is  to  be
  1398.         used  via  cantata,  you  must  first  use  the  "Workspace"
  1399.         pulldown menu to  map  the  "Attributes"  subform.   On  the
  1400.         bottom  left  of  the  "Attributes"  subform  is the option,
  1401.         "Enable Remote Execution".  Set this logical to "Yes".  Now,
  1402.         all  glyphs  representing Khoros programs will appear with a
  1403.         network symbol in the  middle.   Clicking  on  this  network
  1404.         symbol  will  bring  up  a  list  of machines.  This list of
  1405.         machines is called the network browser, and the contents  of
  1406.         the  network  browser  is  dictated by the machines that you
  1407.         listed earlier in your ".khoros hosts" file (or  other  file
  1408.                                        -
  1409.         specified   by   KHOROS HOSTS).    If   there   is   not   a
  1410.                                -
  1411.         ".khoros hosts" file, the initial list of  hosts  will  only
  1412.                 -
  1413.         include  the  local  machine.   You  can  interactively  add
  1414.         machine  names  via  the  network  browser.   Selecting  the
  1415.         desired  machine  will  cause  that program to be run on the
  1416.         specified machine.
  1417.  
  1418.              Before programs can be executed on remote  machines,  a
  1419.         daemon  must be started on that remote machine to run Khoros
  1420.         programs on behalf  of  the  local  machine.   Cantata  will
  1421.         attempt  to  start  these  daemons  for  you, automatically;
  1422.         however, if cantata has problems starting these daemons, you
  1423.         may  have  to  start  them  yourself.  When data transport /
  1424.         distributed processing is to be used via the  command  line,
  1425.         it  is  always necessary to start the distributed processing
  1426.         daemons  on  the  remote  machines  that  are  to  be  used.
  1427.         Starting  the daemons is a simple process; it can be done in
  1428.         one of two ways.  The first way is to log on to each machine
  1429.         on  which  programs  will  be executed, and run the phantomd
  1430.         program directly.  Suppose we are on machine A, and will  be
  1431.         using  the  distributed  processing  capability  to  execute
  1432.         programs on machines B, C,  and  D.   Before  attempting  to
  1433.         execute  programs  on the three remote machines, we must log
  1434.         on to each of machines B, C, and D, and execute:
  1435.          % phantomd
  1436.  
  1437.              The second way  to  start  the  distributed  processing
  1438.         daemons on the desired remote machines is to use the phantom
  1439.         shell script on the local  machine,  once  for  each  remote
  1440.         machine  that  is to be used for program execution.  In this
  1441.         case, we would execute, on machine A:
  1442.  
  1443.         % phantom machineB
  1444.         % phantom machineC
  1445.         % phantom machineD
  1446.  
  1447.              Note that when distributed processing is to be used via
  1448.         cantata,  cantata  will  remote  shell  to  the  machines in
  1449.         question,  and  execute  the  phantomd  program   for   you.
  1450.         However,  if  cantata  fails  for  some  reason to start the
  1451.         daemons properly, you will  have  to  use  one  of  the  two
  1452.  
  1453.         KHOROS                  Release: 1.0                  1 - 22
  1454.  
  1455.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1456.         ------ -  -  ------ ------
  1457.  
  1458.         above-mentioned  methods to start the daemons on the desired
  1459.         remote machines yourself.  In any case, it is required  that
  1460.         both the KHOROS HOSTS environment variable and the ".rhosts"
  1461.                        -
  1462.         file are set properly before the  daemons  can  be  started.
  1463.         Daemons  started  in this way have a 1/2 hour time-out limit
  1464.         set.  Thus, if  more  than  one  half  hour  elapses  before
  1465.         distributed  processing  is  used,  you  must  re-start  the
  1466.         daemons again.  If you would like  to  change  the  time-out
  1467.         limit,  you  may  use  the  [-timeout time] option to either
  1468.                                               ----
  1469.         phantom or phantomd, where time is provided in minutes.
  1470.                                    ----
  1471.  
  1472.              There are two conventions which dictate  what  type  of
  1473.         data  transport  mechanism  is  to  be  used,  and whether a
  1474.         routine should be executed on a remote machine.  If no  data
  1475.         transport  mechanism  is  explicitly  specified,  the Khoros
  1476.         transport  and  distribution  routines  will  negotiate  the
  1477.         transport  mechanism  automatically.   However, if you would
  1478.         like to dictate the data transport mechanism yourself,  then
  1479.         you must follow the two transport specification conventions.
  1480.         The first convention is used to  specify  a  data  transport
  1481.         mechanism:
  1482.                   identifier=token
  1483.  
  1484.              Where  identifier  is  one  of   the   data   transport
  1485.                     ----------
  1486.         mechanisms   listed   earlier,  such  as  "shm",  "file"  or
  1487.         "socket".
  1488.  
  1489.              The token is the type of identifier for that transport.
  1490.                  -----
  1491.         For  a  file, it is simply the filename.  For shared memory,
  1492.         it is the shared memory key.  For a pipe, it is the input  &
  1493.         output  file descriptors, as in "pipe=[3,4]".  For a socket,
  1494.         it is the number of the socket, as in "socket=5430".
  1495.  
  1496.              The second convention  is  used  to  specify  a  remote
  1497.         machine  for  distributed  processing;  it specifies where a
  1498.         token is located.  For instance, if you want to  retrieve  a
  1499.         regular file from a remote machine, then the syntax is:
  1500.                   file=filename@machine
  1501.                             or
  1502.                   filename@machine
  1503.  
  1504.              This causes the Khoros I/O routines to  look  thru  the
  1505.         internal  list  of  data transport mechanisms and select the
  1506.         first available remote transport mechanism. In the currently
  1507.         available list, this will be "socket".  If a specific remote
  1508.         transport mechanism is desired, then the following should be
  1509.         used:
  1510.                   filename@socket=machine
  1511.  
  1512.              Multiple machine routing is also allowed.   This  means
  1513.         that  if  you  cannot directly access a file from your local
  1514.         machine, but  you  can  access  the  file  via  the  machine
  1515.         "gateway", then you may use the following syntax to retrieve
  1516.         the file:
  1517.  
  1518.         KHOROS                  Release: 1.0                  1 - 23
  1519.  
  1520.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1521.         ------ -  -  ------ ------
  1522.  
  1523.                   filename@machine@gateway
  1524.  
  1525.              Almost  all  combinations  are  allowed,  but   it   is
  1526.         important to remember that local transport mechanisms CANNOT
  1527.                                    ----- --------- ---------- ------
  1528.         be used  with  distributed  processing.  For  instance,  the
  1529.         -- ----  ----  -----------  ----------
  1530.         following specification will result in an error:
  1531.                   filename@stream=machine
  1532.  
  1533.         H.3  USE OF DIFFERENT FONTS & COLORS
  1534.  
  1535.              There are three  ways  to  specify  fonts  with  Khoros
  1536.         application  programs, and one way to specify colors for use
  1537.         with Khoros applications.  Let us discuss  fonts  first.   A
  1538.         specific font may be specified for the entire graphical user
  1539.         interface of a Khoros xvroutine by using  the  [-fn]  option
  1540.         that   is  available  with  all  Khoros  xvroutines,  or  by
  1541.         specifying the desired font in the .Xdefaults file.
  1542.  
  1543.         H.3.1  CHANGING THE FONT FOR AN ENTIRE APPLICATION
  1544.  
  1545.              The first two ways of changing  the  font,  which  will
  1546.         change  the  font  for ALL fonts in preview's graphical user
  1547.         interface, for instance, to kana14:
  1548.  
  1549.         % preview -fn kana14
  1550.  
  1551.         Alternatively, you may edit your .Xdefaults  file,  and  add
  1552.         the line:
  1553.  
  1554.         preview.font:   kana14
  1555.  
  1556.         If  you  want  *all*  Khoros  xvroutines  to  appear  in   a
  1557.         particular  font,  you  may  use  a  wildcard  for  the font
  1558.         specified in the .Xdefaults file, for example:
  1559.  
  1560.         *.font:   fixed
  1561.  
  1562.         This will make the graphical user interface  of  ALL  Khoros
  1563.         xvroutines appear in the fixed font.  Unfortunately, it will
  1564.         also make all other X Windows applications come  up  with  a
  1565.         fixed  font.   At  this  point, there is no easy solution to
  1566.         this problem, but we are working on a  better  approach  for
  1567.         Khoros 2.0.  Now, if you want specific programs to appear in
  1568.         a diffent font, you can  add  each  one  specifically.   For
  1569.         example,  suppose  you want all Khoros routines to appear in
  1570.         the fixed font except xprism3, which  you  want  to  see  in
  1571.         8x13bold.  You would follow the line above with:
  1572.  
  1573.         xprism3.font:   8x13bold
  1574.  
  1575.         KHOROS                  Release: 1.0                  1 - 24
  1576.  
  1577.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1578.         ------ -  -  ------ ------
  1579.  
  1580.         This line will over-ride the previous wildcard statement for
  1581.         the  xprism3  font.  Alternatively, you could have specified
  1582.         on the command line:
  1583.  
  1584.         % xprism3 -fn 8x13bold
  1585.  
  1586.         Since the [-fn] option always over-rides any  specifications
  1587.         found  in  the  Xdefaults file.  NOTE: we were unable to get
  1588.         the  SGI  architecture  to  get  specificattions  from   the
  1589.         .Xdefaults  file;  if  you are running Khoros on an SGI, you
  1590.         will have to always use the [-fn] option to change fonts.
  1591.  
  1592.         H.3.2  CHANGING THE FONTS & COLORS WITHIN AN APPLICATION
  1593.  
  1594.              As a true  understanding  of  this  procedure  is  more
  1595.         complicated,  beginning Khoros users are advised to save the
  1596.         detailed explanation in the  latter  part  of  this  section
  1597.         until   later;    one   font  is  generally  enough  for  an
  1598.         application. In addition, the .Xdefaults file provided  with
  1599.         Khoros   already   provides   different  border  colors  for
  1600.         different types of buttons for the graphical user  interface
  1601.         of  Khoros  applications.   If these colors do not suit you,
  1602.         you may easily change  them  with  a  global  change  editor
  1603.         command,  without  knowing  the details that make them work.
  1604.         You might, for example, edit the .Xdefaults file and  change
  1605.         all  occurances  of "sea green" to "light green". Since this
  1606.         .Xdefaults file only uses the color "sea green"  to  specify
  1607.                         ----
  1608.         the  border  color  of  a Help button, doing a global change
  1609.         from "sea green" to "light green" will result  in  all  Help
  1610.         buttons being displayed with borders of light green.  If you
  1611.         use the vi visual editor, the global change is made with:
  1612.                 --
  1613.  
  1614.         :1,$ s/sea green/light green/g
  1615.  
  1616.         If  you  use  the  emacs  visual  editor,  which   is   more
  1617.         --  ---  ---  ---  -----  ------  ------   -----   --   ----
  1618.         interactive, you can do a global change by:
  1619.         -----------  --- --- -- - ------ ------ --
  1620.  
  1621.         <esc> @
  1622.          ---
  1623.  
  1624.         Note that the colors supported by  your  display  should  be
  1625.         ---- ---- --- ------ --------- --  ----  -------  ------  --
  1626.         listed  in  /usr/lib/X11/rgb.txt.  Some systems may have the
  1627.         ------  --   --- --- --- --- ---   ---- ------- --- ---- ---
  1628.         xcolors program, which displays the  available  colors  with
  1629.                 -------  ----- -------- ---  ---------  ------  ----
  1630.         labels,   and   is  very  helpful  in  deciding  on  a  good
  1631.         ------    ---   --  ----  -------  --  --------  --  -  ----
  1632.         combination of colors.  Remember that changes made  to  your
  1633.         ----------- -- ------   -------- ---- ------- ----  --  ----
  1634.         .Xdefaults file will not take effect until you execute:
  1635.          --------- ---- ---- --- ---- ------ ----- --- -------
  1636.  
  1637.         % xrdb .Xdefaults
  1638.           ----  ---------
  1639.  
  1640.         Some more creative users may want  to  specify  a  different
  1641.  
  1642.         KHOROS                  Release: 1.0                  1 - 25
  1643.  
  1644.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1645.         ------ -  -  ------ ------
  1646.  
  1647.         font for different parts of the graphical user interface, or
  1648.         a different color for different parts of the graphical  user
  1649.         interface  that  are  not  addressed  in the .Xdefaults file
  1650.         distributed with Khoros.   Specifying  fonts  for  different
  1651.         items  in  the  graphical  user  interface  follows the same
  1652.         procedure as for specifying different colors.  This  process
  1653.         is  tedious,  but  not  very difficult.  The tricky thing is
  1654.         that you must know the entire, complete name of each  widget
  1655.         in  the graphical user interface that You wish to change the
  1656.         font of.  This information can be deduced from the UIS  file
  1657.         for the Khoros application that you are interested in.
  1658.  
  1659.              Let's learn with an example of changing fonts within an
  1660.         application.  Suppose  you  want to run preview, and have it
  1661.         come up with the help button in kana14, the quit  button  in
  1662.         lucidasans-10,  the  "Revisit"  and "Edit" action buttons in
  1663.         6x13bold, and the  text  of  the  input  file  parameter  in
  1664.         lucidasans-14.    Copy   the   .Xdefaults   file   found  in
  1665.         KHOROS HOME/dotfiles. First, you must  look  at  the  *.form
  1666.               -
  1667.         file  for  preview, because you will need the names that are
  1668.         specified there.  Do:
  1669.         % more KHOROS HOME/repos/preview/preview.form
  1670.                      -
  1671.  
  1672.              Here, look for the "Form Name" specified at the end  of
  1673.                                      -
  1674.         the  [-F]  line,  which  is  "UI view".   The "Subform Name"
  1675.                                         -                     -
  1676.         specified at the end of the [-M] line is "show".   You  must
  1677.         recognise  that  preview's  user interface has only a single
  1678.         subform.  There is no  master  form,  as  in  editimage,  or
  1679.         xprism2.   So, in the .Xdefaults file, you will refer to the
  1680.         preview  subform  by  its   full   name,   which   will   be
  1681.         X form Y subform,  where X = Form Name and Y = Subform Name.
  1682.          -    - -                        -                    -
  1683.         So you know that you must begin lines in the .Xdefaults file
  1684.         as follows:
  1685.         UI view form show subform*
  1686.           -    -    -    -
  1687.  
  1688.              Now, you want to specify fonts for the  help  and  quit
  1689.         buttons.    Help   and   quit   buttons   are  always  named
  1690.         %d help button and %d quit button respectively, where %d  is
  1691.           -    -             -    -
  1692.         the  count  of  the  number of help and quit buttons on that
  1693.         pane, starting at zero.  There is only one help  button  and
  1694.         one  quit  button  on the preview subform, so that means you
  1695.         put in the .Xdefaults file:
  1696.  
  1697.         UI view form show subform*0 help button: kana14
  1698.           -    -    -    -         -    -
  1699.         UI view form show subform*0 quit button: lucidasans-10
  1700.           -    -    -    -         -    -
  1701.  
  1702.              Now, let's see what else we have to work with.  In  the
  1703.         preview.form  file,  there  are  two  pane  action  buttons,
  1704.         specified by [-a] lines.  Their variable names are "revisit"
  1705.         and   "edit".    Pane   action   buttons   will   be   named
  1706.         x pane action button, where x = variable  name.   Therefore,
  1707.          -    -      -
  1708.         add to the .Xdefaults file:
  1709.  
  1710.         KHOROS                  Release: 1.0                  1 - 26
  1711.  
  1712.         Volume I  -  User's Manual   Chapter 1  -  Getting Started
  1713.         ------ -  -  ------ ------
  1714.  
  1715.         UI view form show subform*revisit pane action button*font:
  1716.           -    -    -    -               -    -      -
  1717.         6x13bold
  1718.         UI view form show subform*edit pane action button*font:
  1719.           -    -    -    -            -    -      -
  1720.         6x13bold
  1721.  
  1722.              Finally,  there  is  an  input  file  selection.    The
  1723.         backplane   widget   for   InputFile   selections  is  named
  1724.         "w input back"  where w is the variable name at the  end  of
  1725.           -     -
  1726.         the  [-I]  line  -  in this case "i".  So the last line must
  1727.         read,
  1728.  
  1729.         UI view form show subform*i input back*font: lucidasans-14
  1730.           -    -    -    -         -     -
  1731.  
  1732.         Now, you're all set.  Write the file, and do:
  1733.  
  1734.         % xrdb .Xdefaults
  1735.  
  1736.              If your fonts do not change properly, look for  a  line
  1737.         that  looks  like, "preview.font: fixed.  Remember that this
  1738.         will over-ride any other specifications that you might have;
  1739.         you  must  delete this line in order for the above procedure
  1740.         to work.
  1741.  
  1742.              Colors are changed  exactly  the  same  as  fonts  are,
  1743.         except  that  instead  of referring to "*font", you refer to
  1744.         "*borderColor".  We have found that  adding  colors  to  the
  1745.         graphical  user  interface  is most effective when it is the
  1746.         color of the border that is  changed.   However,  you  might
  1747.         also want to experiment with "*foreground" and "*background"
  1748.         to achieve interesting effects.
  1749.  
  1750.         KHOROS                  Release: 1.0                  1 - 27
  1751.  
  1752.  
  1753.